package com.css.config;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author Dbj
 * @date 2024年09月18日  12:51
 */
public class ThreadPoolConfig {
    public static final int queueSize = Runtime.getRuntime().availableProcessors();
    public static ThreadPoolExecutor exeBizThreadPoolExecutor = // 业务调度线程 线程数：cpu核数 * 2 + 3
            new ThreadPoolExecutor(queueSize * 2 + 3, queueSize * 2 + 3, 0L, TimeUnit.MILLISECONDS,
                    new LinkedBlockingQueue<Runnable>());
//    public static ThreadPoolExecutor exeBizThreadPoolExecutor = // 业务调度线程 线程数：cpu核数 * 2 + 3
//            new ThreadPoolExecutor(queueSize  , queueSize , 0L, TimeUnit.MILLISECONDS,
//                    new LinkedBlockingQueue<Runnable>());

}
